<?php

namespace Admin\Model;

class AdminProduct
{
	public $id;
	public $maHang;
	public $soLuong;
	public $hinhAnh;
	public $soLuongNhapVao;
	public $ngayNhap;
	public $gia;
	public $loaiHang;
	public $moTa;
	public $ten;
	public $giaBan;
	public $tinhTrang;
	public function exchangeArray($data){
		$this->id     			= (!empty($data['id'])) ? $data['id'] : null;
		$this->maHang     		= (!empty($data['maHang'])) ? $data['maHang'] : null;
		$this->soLuong     		= (!empty($data['soLuong'])) ? $data['soLuong'] : null;
		$this->hinhAnh     		= (!empty($data['hinhAnh'])) ? $data['hinhAnh'] : null;
		$this->soLuongNhapVao   = (!empty($data['soLuongNhapVao'])) ? $data['soLuongNhapVao'] : null;
		$this->ngayNhap     	= (!empty($data['ngayNhap'])) ? $data['ngayNhap'] : null;
		$this->gia     			= (!empty($data['gia'])) ? $data['gia'] : null;
		$this->loaiHang     	= (!empty($data['loaiHang'])) ? $data['loaiHang'] : null;
		$this->moTa     		= (!empty($data['moTa'])) ? $data['moTa'] : null;
		$this->ten 				= (!empty($data['ten'])) ? $data['ten'] : null;
		$this->giaBan 			= (!empty($data['giaBan'])) ? $data['giaBan'] : null;
		$this->tinhTrang 			= (!empty($data['tinhTrang'])) ? $data['tinhTrang'] : null;
	}
}